
/*

Design Pattern Automation Toolkit.
Application to create applications with emphasis on Design patterns.
And support for round trip engineering.
Copyright (C) 2004 Vineeth Neelakant. nvineeth@gmail.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
using System;
using BusinessLayer;
using InfoClasses;
using dpatoolkit.UILayer;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using DesignPatternDefinitions;

namespace dpatoolkit.UILayer
{
    /// <summary>
    /// Summary description for ClassDetailsEditForm.
    /// </summary>
    public class ClassDetailsEditForm : System.Windows.Forms.Form
    {
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button editRefButton;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.Button addRefButton;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.Button removeParamButton;
        private System.Windows.Forms.GroupBox groupBox4;
        private System.Windows.Forms.GroupBox groupBox3;
        private System.Windows.Forms.Button remCreatesButton;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.ComboBox aggComboBox;
        private System.Windows.Forms.CheckBox abstrCheckBox;
        private System.Windows.Forms.Button addInhButton;
        private System.Windows.Forms.Panel creationPanel;
        private System.Windows.Forms.Label infoLabel;
        private System.Windows.Forms.GroupBox paramGroupBox;
        private System.Windows.Forms.ComboBox crtComboBox;
        private System.Windows.Forms.DataGrid aggrDataGrid;
        private System.Windows.Forms.LinkLabel reflinkLabel;
        private System.Windows.Forms.Button addMethodButton;
        private System.Windows.Forms.TextBox ClassNameTextBox;
        private System.Windows.Forms.LinkLabel clsLinkLabel;
        private System.Windows.Forms.Panel referencePanel;
        private System.Windows.Forms.DataGrid referenceDataGrid;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Button addAggrButton;
        private System.Windows.Forms.Panel aggregatesPanel;
        private System.Windows.Forms.Button editCreatesButton;
        private System.Windows.Forms.Button remMethodButton;
        private System.Windows.Forms.DataGrid createsDataGrid;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.DataGrid methodDataGrid;
        private System.Windows.Forms.DataGrid inheritDataGrid;
        private System.Windows.Forms.Panel classPropPanel;
        private System.Windows.Forms.Panel inheritancePanel;
        private System.Windows.Forms.ListBox crtClsListBox;
        private System.Windows.Forms.Panel fieldsPanel;
        private System.Windows.Forms.Button editMethodButton;
        private System.Windows.Forms.LinkLabel flinkLabel;
        private System.Windows.Forms.LinkLabel mlinkLabel;
        private System.Windows.Forms.ComboBox inhComboBox;
        private System.Windows.Forms.Button editFieldButton;
        private System.Windows.Forms.Button remAggrButton;
        private System.Windows.Forms.Button delInhButton;
        private System.Windows.Forms.ListBox aggClassListBox;
        private System.Windows.Forms.ListBox refClassListBox;
        private System.Windows.Forms.LinkLabel inhlinkLabel;
        private System.Windows.Forms.Button editAggButton;
        private System.Windows.Forms.Button paramDownButton;
        private System.Windows.Forms.Button paramUpButton;
        private System.Windows.Forms.LinkLabel agglinkLabel;
        private System.Windows.Forms.TextBox summaryTextBox;
        private System.Windows.Forms.Button doneButton;
        private System.Windows.Forms.Button addParamButton;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Button delRefButton;
        private System.Windows.Forms.Button addCreatesButton;
        private System.Windows.Forms.ListBox inhClassListBox;
        private System.Windows.Forms.Button paramEditButton;
        private System.Windows.Forms.Button classMetaInfoButton;
        private System.Windows.Forms.LinkLabel crtlinkLabel;
        private System.Windows.Forms.Button remFieldButton;
        private System.Windows.Forms.Panel methodsPanel;
        private System.Windows.Forms.Button addFieldButton;
        private System.Windows.Forms.ComboBox refComboBox;
        private System.Windows.Forms.DataGrid fieldDataGrid;
        private System.Windows.Forms.DataGrid paramsDataGrid;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.Container components = null;

        private Hashtable labelToInfo = new Hashtable(),
            labelToPanel = new Hashtable();
        private DataSet dataSet;
        private string compName, cName;
        private IDesignPatternSubject subject;
        #region constructor/dispose

        public ClassDetailsEditForm(DataSet ds, string comp, string cls, int page, IDesignPatternSubject sub)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            this.dataSet = ds;
            this.compName = comp;
            this.cName = cls;
            this.Text = this.compName + ":" + this.cName + " Class Details";
            this.subject = sub;

            this.labelToInfo.Add(this.clsLinkLabel.Text, "Edit the Class Properties");
            this.labelToInfo.Add(this.flinkLabel.Text, "Fields of the class");
            this.labelToInfo.Add(this.mlinkLabel.Text, "Methods of the class");
            this.labelToInfo.Add(this.inhlinkLabel.Text, "Inheritance of the class");
            this.labelToInfo.Add(this.crtlinkLabel.Text, "Creates relation of the class");
            this.labelToInfo.Add(this.reflinkLabel.Text, "References maintained by the class");
            this.labelToInfo.Add(this.agglinkLabel.Text, "Aggregates of the class");

            this.labelToPanel.Add(this.clsLinkLabel.Text, this.classPropPanel);
            this.labelToPanel.Add(this.flinkLabel.Text, this.fieldsPanel);
            this.labelToPanel.Add(this.mlinkLabel.Text, this.methodsPanel);
            this.labelToPanel.Add(this.inhlinkLabel.Text, this.inheritancePanel);
            this.labelToPanel.Add(this.crtlinkLabel.Text, this.creationPanel);
            this.labelToPanel.Add(this.reflinkLabel.Text, this.referencePanel);
            this.labelToPanel.Add(this.agglinkLabel.Text, this.aggregatesPanel);


            switch (page)
            {


                case 1:
                    this.LinkClicked(this.clsLinkLabel, null);
                    break;
                case 2:
                    this.LinkClicked(this.flinkLabel, null);
                    break;
                case 3:
                    this.LinkClicked(this.mlinkLabel, null);
                    break;
                case 4:
                    this.LinkClicked(this.inhlinkLabel, null);
                    break;
                case 5:
                    this.LinkClicked(this.agglinkLabel, null);
                    break;
                case 6:
                    this.LinkClicked(this.reflinkLabel, null);
                    break;
                case 7:
                    this.LinkClicked(this.crtlinkLabel, null);
                    break;
                default:
                    this.LinkClicked(this.clsLinkLabel, null);
                    break;

            }


            this.InitClassDetails();
            this.InitFieldDataGrid();
            this.InitMethodDataGrid();
            this.InitParameterDataGrid();
            this.InitInheritanceDataGrid();
            this.InitAggregateDataGrid();
            this.InitCreatesDataGrid();
            this.InitReferenceDataGrid();
            this.InitComponentComboBoxes();
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #endregion
        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.paramsDataGrid = new System.Windows.Forms.DataGrid();
            this.fieldDataGrid = new System.Windows.Forms.DataGrid();
            this.refComboBox = new System.Windows.Forms.ComboBox();
            this.addFieldButton = new System.Windows.Forms.Button();
            this.methodsPanel = new System.Windows.Forms.Panel();
            this.paramGroupBox = new System.Windows.Forms.GroupBox();
            this.paramDownButton = new System.Windows.Forms.Button();
            this.paramUpButton = new System.Windows.Forms.Button();
            this.paramEditButton = new System.Windows.Forms.Button();
            this.removeParamButton = new System.Windows.Forms.Button();
            this.addParamButton = new System.Windows.Forms.Button();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.editMethodButton = new System.Windows.Forms.Button();
            this.methodDataGrid = new System.Windows.Forms.DataGrid();
            this.addMethodButton = new System.Windows.Forms.Button();
            this.remMethodButton = new System.Windows.Forms.Button();
            this.remFieldButton = new System.Windows.Forms.Button();
            this.crtlinkLabel = new System.Windows.Forms.LinkLabel();
            this.classMetaInfoButton = new System.Windows.Forms.Button();
            this.inhClassListBox = new System.Windows.Forms.ListBox();
            this.addCreatesButton = new System.Windows.Forms.Button();
            this.delRefButton = new System.Windows.Forms.Button();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.doneButton = new System.Windows.Forms.Button();
            this.summaryTextBox = new System.Windows.Forms.TextBox();
            this.agglinkLabel = new System.Windows.Forms.LinkLabel();
            this.editAggButton = new System.Windows.Forms.Button();
            this.inhlinkLabel = new System.Windows.Forms.LinkLabel();
            this.refClassListBox = new System.Windows.Forms.ListBox();
            this.aggClassListBox = new System.Windows.Forms.ListBox();
            this.delInhButton = new System.Windows.Forms.Button();
            this.remAggrButton = new System.Windows.Forms.Button();
            this.editFieldButton = new System.Windows.Forms.Button();
            this.inhComboBox = new System.Windows.Forms.ComboBox();
            this.mlinkLabel = new System.Windows.Forms.LinkLabel();
            this.flinkLabel = new System.Windows.Forms.LinkLabel();
            this.fieldsPanel = new System.Windows.Forms.Panel();
            this.crtClsListBox = new System.Windows.Forms.ListBox();
            this.inheritancePanel = new System.Windows.Forms.Panel();
            this.label4 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.addInhButton = new System.Windows.Forms.Button();
            this.inheritDataGrid = new System.Windows.Forms.DataGrid();
            this.classPropPanel = new System.Windows.Forms.Panel();
            this.ClassNameTextBox = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.abstrCheckBox = new System.Windows.Forms.CheckBox();
            this.label1 = new System.Windows.Forms.Label();
            this.createsDataGrid = new System.Windows.Forms.DataGrid();
            this.editCreatesButton = new System.Windows.Forms.Button();
            this.aggregatesPanel = new System.Windows.Forms.Panel();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.aggComboBox = new System.Windows.Forms.ComboBox();
            this.addAggrButton = new System.Windows.Forms.Button();
            this.aggrDataGrid = new System.Windows.Forms.DataGrid();
            this.label5 = new System.Windows.Forms.Label();
            this.referenceDataGrid = new System.Windows.Forms.DataGrid();
            this.referencePanel = new System.Windows.Forms.Panel();
            this.label7 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.editRefButton = new System.Windows.Forms.Button();
            this.addRefButton = new System.Windows.Forms.Button();
            this.clsLinkLabel = new System.Windows.Forms.LinkLabel();
            this.reflinkLabel = new System.Windows.Forms.LinkLabel();
            this.crtComboBox = new System.Windows.Forms.ComboBox();
            this.infoLabel = new System.Windows.Forms.Label();
            this.creationPanel = new System.Windows.Forms.Panel();
            this.label6 = new System.Windows.Forms.Label();
            this.remCreatesButton = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.paramsDataGrid)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.fieldDataGrid)).BeginInit();
            this.methodsPanel.SuspendLayout();
            this.paramGroupBox.SuspendLayout();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.methodDataGrid)).BeginInit();
            this.fieldsPanel.SuspendLayout();
            this.inheritancePanel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.inheritDataGrid)).BeginInit();
            this.classPropPanel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.createsDataGrid)).BeginInit();
            this.aggregatesPanel.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.groupBox3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.aggrDataGrid)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.referenceDataGrid)).BeginInit();
            this.referencePanel.SuspendLayout();
            this.creationPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // paramsDataGrid
            // 
            this.paramsDataGrid.AllowSorting = false;
            this.paramsDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.paramsDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.paramsDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.paramsDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.paramsDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.paramsDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.paramsDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.paramsDataGrid.DataMember = "";
            this.paramsDataGrid.FlatMode = true;
            this.paramsDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.paramsDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.paramsDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.paramsDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.paramsDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.paramsDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.paramsDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.paramsDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.paramsDataGrid.Location = new System.Drawing.Point(8, 15);
            this.paramsDataGrid.Name = "paramsDataGrid";
            this.paramsDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.paramsDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.paramsDataGrid.PreferredColumnWidth = 150;
            this.paramsDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.paramsDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.paramsDataGrid.Size = new System.Drawing.Size(336, 119);
            this.paramsDataGrid.TabIndex = 1;
            // 
            // fieldDataGrid
            // 
            this.fieldDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.fieldDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.fieldDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.fieldDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.fieldDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.fieldDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.fieldDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.fieldDataGrid.CaptionText = "Fields";
            this.fieldDataGrid.DataMember = "";
            this.fieldDataGrid.FlatMode = true;
            this.fieldDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.fieldDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.fieldDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.fieldDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.fieldDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.fieldDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.fieldDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.fieldDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.fieldDataGrid.Location = new System.Drawing.Point(8, 22);
            this.fieldDataGrid.Name = "fieldDataGrid";
            this.fieldDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.fieldDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.fieldDataGrid.PreferredColumnWidth = 159;
            this.fieldDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.fieldDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.fieldDataGrid.Size = new System.Drawing.Size(496, 179);
            this.fieldDataGrid.TabIndex = 0;
            this.fieldDataGrid.MouseUp += new System.Windows.Forms.MouseEventHandler(this.fieldDataGrid_MouseUp);
            // 
            // refComboBox
            // 
            this.refComboBox.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.refComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.refComboBox.Location = new System.Drawing.Point(0, 37);
            this.refComboBox.Name = "refComboBox";
            this.refComboBox.Size = new System.Drawing.Size(392, 21);
            this.refComboBox.Sorted = true;
            this.refComboBox.TabIndex = 5;
            this.refComboBox.SelectedIndexChanged += new System.EventHandler(this.refComboBox_SelectedIndexChanged);
            // 
            // addFieldButton
            // 
            this.addFieldButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.addFieldButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.addFieldButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addFieldButton.Location = new System.Drawing.Point(24, 223);
            this.addFieldButton.Name = "addFieldButton";
            this.addFieldButton.Size = new System.Drawing.Size(75, 21);
            this.addFieldButton.TabIndex = 1;
            this.addFieldButton.Text = "&Add";
            this.addFieldButton.Click += new System.EventHandler(this.addFieldButton_Click);
            // 
            // methodsPanel
            // 
            this.methodsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.methodsPanel.Controls.Add(this.paramGroupBox);
            this.methodsPanel.Controls.Add(this.groupBox1);
            this.methodsPanel.Location = new System.Drawing.Point(128, 32);
            this.methodsPanel.Name = "methodsPanel";
            this.methodsPanel.Size = new System.Drawing.Size(520, 336);
            this.methodsPanel.TabIndex = 12;
            // 
            // paramGroupBox
            // 
            this.paramGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.paramGroupBox.Controls.Add(this.paramDownButton);
            this.paramGroupBox.Controls.Add(this.paramUpButton);
            this.paramGroupBox.Controls.Add(this.paramEditButton);
            this.paramGroupBox.Controls.Add(this.paramsDataGrid);
            this.paramGroupBox.Controls.Add(this.removeParamButton);
            this.paramGroupBox.Controls.Add(this.addParamButton);
            this.paramGroupBox.Location = new System.Drawing.Point(8, 163);
            this.paramGroupBox.Name = "paramGroupBox";
            this.paramGroupBox.Size = new System.Drawing.Size(504, 142);
            this.paramGroupBox.TabIndex = 7;
            this.paramGroupBox.TabStop = false;
            this.paramGroupBox.Text = "Parameters";
            // 
            // paramDownButton
            // 
            this.paramDownButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.paramDownButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.paramDownButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.paramDownButton.Location = new System.Drawing.Point(352, 82);
            this.paramDownButton.Name = "paramDownButton";
            this.paramDownButton.Size = new System.Drawing.Size(44, 29);
            this.paramDownButton.TabIndex = 11;
            this.paramDownButton.Text = "&Down";
            this.paramDownButton.Click += new System.EventHandler(this.paramDownButton_Click);
            // 
            // paramUpButton
            // 
            this.paramUpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.paramUpButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.paramUpButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.paramUpButton.Location = new System.Drawing.Point(352, 45);
            this.paramUpButton.Name = "paramUpButton";
            this.paramUpButton.Size = new System.Drawing.Size(40, 29);
            this.paramUpButton.TabIndex = 10;
            this.paramUpButton.Text = "&Up";
            this.paramUpButton.Click += new System.EventHandler(this.paramUpButton_Click);
            // 
            // paramEditButton
            // 
            this.paramEditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.paramEditButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.paramEditButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.paramEditButton.Location = new System.Drawing.Point(400, 52);
            this.paramEditButton.Name = "paramEditButton";
            this.paramEditButton.Size = new System.Drawing.Size(96, 21);
            this.paramEditButton.TabIndex = 9;
            this.paramEditButton.Text = "&Edit";
            this.paramEditButton.Click += new System.EventHandler(this.paramEditButton_Click);
            // 
            // removeParamButton
            // 
            this.removeParamButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.removeParamButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.removeParamButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.removeParamButton.Location = new System.Drawing.Point(400, 82);
            this.removeParamButton.Name = "removeParamButton";
            this.removeParamButton.Size = new System.Drawing.Size(96, 21);
            this.removeParamButton.TabIndex = 4;
            this.removeParamButton.Text = "&Remove ";
            this.removeParamButton.Click += new System.EventHandler(this.removeParamButton_Click);
            // 
            // addParamButton
            // 
            this.addParamButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.addParamButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.addParamButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addParamButton.Location = new System.Drawing.Point(400, 22);
            this.addParamButton.Name = "addParamButton";
            this.addParamButton.Size = new System.Drawing.Size(96, 22);
            this.addParamButton.TabIndex = 5;
            this.addParamButton.Text = "&Add ";
            this.addParamButton.Click += new System.EventHandler(this.addParamButton_Click);
            // 
            // groupBox1
            // 
            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.groupBox1.Controls.Add(this.editMethodButton);
            this.groupBox1.Controls.Add(this.methodDataGrid);
            this.groupBox1.Controls.Add(this.addMethodButton);
            this.groupBox1.Controls.Add(this.remMethodButton);
            this.groupBox1.Location = new System.Drawing.Point(8, 7);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(504, 142);
            this.groupBox1.TabIndex = 6;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Methods";
            // 
            // editMethodButton
            // 
            this.editMethodButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.editMethodButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.editMethodButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.editMethodButton.Location = new System.Drawing.Point(400, 52);
            this.editMethodButton.Name = "editMethodButton";
            this.editMethodButton.Size = new System.Drawing.Size(96, 21);
            this.editMethodButton.TabIndex = 5;
            this.editMethodButton.Text = "&Edit";
            this.editMethodButton.Click += new System.EventHandler(this.editMethodButton_Click);
            // 
            // methodDataGrid
            // 
            this.methodDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.methodDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.methodDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.methodDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.methodDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.methodDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.methodDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.methodDataGrid.DataMember = "";
            this.methodDataGrid.FlatMode = true;
            this.methodDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.methodDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.methodDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.methodDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.methodDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.methodDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.methodDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.methodDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.methodDataGrid.Location = new System.Drawing.Point(16, 15);
            this.methodDataGrid.Name = "methodDataGrid";
            this.methodDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.methodDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.methodDataGrid.PreferredColumnWidth = 150;
            this.methodDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.methodDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.methodDataGrid.Size = new System.Drawing.Size(376, 119);
            this.methodDataGrid.TabIndex = 0;
            this.methodDataGrid.CurrentCellChanged += new System.EventHandler(this.methodDataGrid_CurrentCellChanged);
            // 
            // addMethodButton
            // 
            this.addMethodButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.addMethodButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.addMethodButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addMethodButton.Location = new System.Drawing.Point(400, 22);
            this.addMethodButton.Name = "addMethodButton";
            this.addMethodButton.Size = new System.Drawing.Size(96, 22);
            this.addMethodButton.TabIndex = 2;
            this.addMethodButton.Text = "&Add ";
            this.addMethodButton.Click += new System.EventHandler(this.addMethodButton_Click);
            // 
            // remMethodButton
            // 
            this.remMethodButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.remMethodButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.remMethodButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.remMethodButton.Location = new System.Drawing.Point(400, 82);
            this.remMethodButton.Name = "remMethodButton";
            this.remMethodButton.Size = new System.Drawing.Size(96, 21);
            this.remMethodButton.TabIndex = 3;
            this.remMethodButton.Text = "&Remove";
            this.remMethodButton.Click += new System.EventHandler(this.remMethodButton_Click);
            // 
            // remFieldButton
            // 
            this.remFieldButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.remFieldButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.remFieldButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.remFieldButton.Location = new System.Drawing.Point(200, 223);
            this.remFieldButton.Name = "remFieldButton";
            this.remFieldButton.Size = new System.Drawing.Size(72, 22);
            this.remFieldButton.TabIndex = 2;
            this.remFieldButton.Text = "&Remove";
            this.remFieldButton.Click += new System.EventHandler(this.remFieldButton_Click);
            // 
            // crtlinkLabel
            // 
            this.crtlinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.crtlinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.crtlinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.crtlinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.crtlinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 8);
            this.crtlinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.crtlinkLabel.Location = new System.Drawing.Point(16, 319);
            this.crtlinkLabel.Name = "crtlinkLabel";
            this.crtlinkLabel.Size = new System.Drawing.Size(88, 23);
            this.crtlinkLabel.TabIndex = 5;
            this.crtlinkLabel.TabStop = true;
            this.crtlinkLabel.Text = "Creation";
            this.crtlinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.crtlinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // classMetaInfoButton
            // 
            this.classMetaInfoButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.classMetaInfoButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.classMetaInfoButton.Location = new System.Drawing.Point(80, 223);
            this.classMetaInfoButton.Name = "classMetaInfoButton";
            this.classMetaInfoButton.Size = new System.Drawing.Size(80, 22);
            this.classMetaInfoButton.TabIndex = 14;
            this.classMetaInfoButton.Text = "&MetaInfo >>";
            this.classMetaInfoButton.Click += new System.EventHandler(this.classMetaInfoButton_Click);
            // 
            // inhClassListBox
            // 
            this.inhClassListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.inhClassListBox.Cursor = System.Windows.Forms.Cursors.Hand;
            this.inhClassListBox.Location = new System.Drawing.Point(16, 89);
            this.inhClassListBox.Name = "inhClassListBox";
            this.inhClassListBox.Size = new System.Drawing.Size(400, 95);
            this.inhClassListBox.TabIndex = 3;
            // 
            // addCreatesButton
            // 
            this.addCreatesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.addCreatesButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addCreatesButton.Location = new System.Drawing.Point(432, 30);
            this.addCreatesButton.Name = "addCreatesButton";
            this.addCreatesButton.Size = new System.Drawing.Size(75, 21);
            this.addCreatesButton.TabIndex = 1;
            this.addCreatesButton.Text = "&Add";
            this.addCreatesButton.Click += new System.EventHandler(this.addCreatesButton_Click);
            // 
            // delRefButton
            // 
            this.delRefButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.delRefButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.delRefButton.Location = new System.Drawing.Point(432, 97);
            this.delRefButton.Name = "delRefButton";
            this.delRefButton.Size = new System.Drawing.Size(75, 21);
            this.delRefButton.TabIndex = 2;
            this.delRefButton.Text = "&Remove";
            this.delRefButton.Click += new System.EventHandler(this.delRefButton_Click);
            // 
            // pictureBox1
            // 
            this.pictureBox1.BackColor = System.Drawing.Color.MidnightBlue;
            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
            this.pictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(104, 414);
            this.pictureBox1.TabIndex = 0;
            this.pictureBox1.TabStop = false;
            // 
            // doneButton
            // 
            this.doneButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.doneButton.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.doneButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.doneButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.doneButton.Location = new System.Drawing.Point(544, 379);
            this.doneButton.Name = "doneButton";
            this.doneButton.Size = new System.Drawing.Size(75, 21);
            this.doneButton.TabIndex = 17;
            this.doneButton.Text = "&Done";
            this.doneButton.Click += new System.EventHandler(this.doneButton_Click);
            // 
            // summaryTextBox
            // 
            this.summaryTextBox.AcceptsReturn = true;
            this.summaryTextBox.AcceptsTab = true;
            this.summaryTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.summaryTextBox.Location = new System.Drawing.Point(188, 111);
            this.summaryTextBox.Multiline = true;
            this.summaryTextBox.Name = "summaryTextBox";
            this.summaryTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            this.summaryTextBox.Size = new System.Drawing.Size(280, 97);
            this.summaryTextBox.TabIndex = 13;
            this.summaryTextBox.Text = "";
            // 
            // agglinkLabel
            // 
            this.agglinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.agglinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.agglinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.agglinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.agglinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 10);
            this.agglinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.agglinkLabel.Location = new System.Drawing.Point(16, 230);
            this.agglinkLabel.Name = "agglinkLabel";
            this.agglinkLabel.Size = new System.Drawing.Size(88, 23);
            this.agglinkLabel.TabIndex = 3;
            this.agglinkLabel.TabStop = true;
            this.agglinkLabel.Text = "Aggregates";
            this.agglinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.agglinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // editAggButton
            // 
            this.editAggButton.Anchor = System.Windows.Forms.AnchorStyles.Top;
            this.editAggButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.editAggButton.Location = new System.Drawing.Point(408, 104);
            this.editAggButton.Name = "editAggButton";
            this.editAggButton.Size = new System.Drawing.Size(72, 22);
            this.editAggButton.TabIndex = 4;
            this.editAggButton.Text = "&Edit";
            this.editAggButton.Click += new System.EventHandler(this.editAggButton_Click);
            // 
            // inhlinkLabel
            // 
            this.inhlinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.inhlinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.inhlinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.inhlinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.inhlinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 11);
            this.inhlinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.inhlinkLabel.Location = new System.Drawing.Point(16, 186);
            this.inhlinkLabel.Name = "inhlinkLabel";
            this.inhlinkLabel.Size = new System.Drawing.Size(88, 22);
            this.inhlinkLabel.TabIndex = 2;
            this.inhlinkLabel.TabStop = true;
            this.inhlinkLabel.Text = "Inheritance";
            this.inhlinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.inhlinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // refClassListBox
            // 
            this.refClassListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.refClassListBox.Location = new System.Drawing.Point(8, 89);
            this.refClassListBox.Name = "refClassListBox";
            this.refClassListBox.Size = new System.Drawing.Size(392, 56);
            this.refClassListBox.TabIndex = 4;
            // 
            // aggClassListBox
            // 
            this.aggClassListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.aggClassListBox.Location = new System.Drawing.Point(3, 16);
            this.aggClassListBox.Name = "aggClassListBox";
            this.aggClassListBox.Size = new System.Drawing.Size(378, 108);
            this.aggClassListBox.TabIndex = 3;
            // 
            // delInhButton
            // 
            this.delInhButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.delInhButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.delInhButton.Location = new System.Drawing.Point(432, 141);
            this.delInhButton.Name = "delInhButton";
            this.delInhButton.Size = new System.Drawing.Size(75, 21);
            this.delInhButton.TabIndex = 2;
            this.delInhButton.Text = "&Remove";
            this.delInhButton.Click += new System.EventHandler(this.delInhButton_Click);
            // 
            // remAggrButton
            // 
            this.remAggrButton.Anchor = System.Windows.Forms.AnchorStyles.Top;
            this.remAggrButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.remAggrButton.Location = new System.Drawing.Point(408, 134);
            this.remAggrButton.Name = "remAggrButton";
            this.remAggrButton.Size = new System.Drawing.Size(75, 21);
            this.remAggrButton.TabIndex = 2;
            this.remAggrButton.Text = "&Remove";
            this.remAggrButton.Click += new System.EventHandler(this.remAggrButton_Click);
            // 
            // editFieldButton
            // 
            this.editFieldButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.editFieldButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.editFieldButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.editFieldButton.Location = new System.Drawing.Point(112, 223);
            this.editFieldButton.Name = "editFieldButton";
            this.editFieldButton.Size = new System.Drawing.Size(75, 21);
            this.editFieldButton.TabIndex = 3;
            this.editFieldButton.Text = "&Edit";
            this.editFieldButton.Click += new System.EventHandler(this.editFieldButton_Click);
            // 
            // inhComboBox
            // 
            this.inhComboBox.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.inhComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.inhComboBox.Location = new System.Drawing.Point(16, 45);
            this.inhComboBox.Name = "inhComboBox";
            this.inhComboBox.Size = new System.Drawing.Size(400, 21);
            this.inhComboBox.Sorted = true;
            this.inhComboBox.TabIndex = 6;
            this.inhComboBox.SelectedIndexChanged += new System.EventHandler(this.inhComboBox_SelectedIndexChanged);
            // 
            // mlinkLabel
            // 
            this.mlinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.mlinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.mlinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.mlinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.mlinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 7);
            this.mlinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.mlinkLabel.Location = new System.Drawing.Point(16, 134);
            this.mlinkLabel.Name = "mlinkLabel";
            this.mlinkLabel.Size = new System.Drawing.Size(88, 22);
            this.mlinkLabel.TabIndex = 7;
            this.mlinkLabel.TabStop = true;
            this.mlinkLabel.Text = "Methods";
            this.mlinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.mlinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // flinkLabel
            // 
            this.flinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.flinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.flinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.flinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.flinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 6);
            this.flinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.flinkLabel.Location = new System.Drawing.Point(16, 89);
            this.flinkLabel.Name = "flinkLabel";
            this.flinkLabel.Size = new System.Drawing.Size(88, 22);
            this.flinkLabel.TabIndex = 8;
            this.flinkLabel.TabStop = true;
            this.flinkLabel.Text = "Fields";
            this.flinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.flinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // fieldsPanel
            // 
            this.fieldsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.fieldsPanel.Controls.Add(this.editFieldButton);
            this.fieldsPanel.Controls.Add(this.remFieldButton);
            this.fieldsPanel.Controls.Add(this.addFieldButton);
            this.fieldsPanel.Controls.Add(this.fieldDataGrid);
            this.fieldsPanel.Location = new System.Drawing.Point(128, 32);
            this.fieldsPanel.Name = "fieldsPanel";
            this.fieldsPanel.Size = new System.Drawing.Size(520, 336);
            this.fieldsPanel.TabIndex = 11;
            // 
            // crtClsListBox
            // 
            this.crtClsListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.crtClsListBox.Location = new System.Drawing.Point(8, 74);
            this.crtClsListBox.Name = "crtClsListBox";
            this.crtClsListBox.Size = new System.Drawing.Size(392, 82);
            this.crtClsListBox.TabIndex = 4;
            // 
            // inheritancePanel
            // 
            this.inheritancePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.inheritancePanel.Controls.Add(this.label4);
            this.inheritancePanel.Controls.Add(this.inhComboBox);
            this.inheritancePanel.Controls.Add(this.label2);
            this.inheritancePanel.Controls.Add(this.inhClassListBox);
            this.inheritancePanel.Controls.Add(this.delInhButton);
            this.inheritancePanel.Controls.Add(this.addInhButton);
            this.inheritancePanel.Controls.Add(this.inheritDataGrid);
            this.inheritancePanel.Location = new System.Drawing.Point(128, 32);
            this.inheritancePanel.Name = "inheritancePanel";
            this.inheritancePanel.Size = new System.Drawing.Size(520, 336);
            this.inheritancePanel.TabIndex = 13;
            // 
            // label4
            // 
            this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label4.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label4.Location = new System.Drawing.Point(16, 67);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(280, 21);
            this.label4.TabIndex = 7;
            this.label4.Text = "Available  Classes in the selected component:";
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // label2
            // 
            this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label2.Location = new System.Drawing.Point(16, 15);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(280, 21);
            this.label2.TabIndex = 4;
            this.label2.Text = "Components in the project";
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // addInhButton
            // 
            this.addInhButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.addInhButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addInhButton.Location = new System.Drawing.Point(432, 104);
            this.addInhButton.Name = "addInhButton";
            this.addInhButton.Size = new System.Drawing.Size(75, 21);
            this.addInhButton.TabIndex = 1;
            this.addInhButton.Text = "&Add";
            this.addInhButton.Click += new System.EventHandler(this.addInhButton_Click);
            // 
            // inheritDataGrid
            // 
            this.inheritDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.inheritDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.inheritDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.inheritDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.inheritDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.inheritDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.inheritDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.inheritDataGrid.CaptionText = "Inheritance";
            this.inheritDataGrid.DataMember = "";
            this.inheritDataGrid.FlatMode = true;
            this.inheritDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.inheritDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.inheritDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.inheritDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.inheritDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.inheritDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.inheritDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.inheritDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.inheritDataGrid.Location = new System.Drawing.Point(0, 210);
            this.inheritDataGrid.Name = "inheritDataGrid";
            this.inheritDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.inheritDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.inheritDataGrid.PreferredColumnWidth = 150;
            this.inheritDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.inheritDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.inheritDataGrid.Size = new System.Drawing.Size(520, 126);
            this.inheritDataGrid.TabIndex = 0;
            // 
            // classPropPanel
            // 
            this.classPropPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.classPropPanel.Controls.Add(this.classMetaInfoButton);
            this.classPropPanel.Controls.Add(this.summaryTextBox);
            this.classPropPanel.Controls.Add(this.ClassNameTextBox);
            this.classPropPanel.Controls.Add(this.label3);
            this.classPropPanel.Controls.Add(this.abstrCheckBox);
            this.classPropPanel.Controls.Add(this.label1);
            this.classPropPanel.Location = new System.Drawing.Point(128, 32);
            this.classPropPanel.Name = "classPropPanel";
            this.classPropPanel.Size = new System.Drawing.Size(520, 336);
            this.classPropPanel.TabIndex = 9;
            // 
            // ClassNameTextBox
            // 
            this.ClassNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.ClassNameTextBox.Location = new System.Drawing.Point(188, 48);
            this.ClassNameTextBox.Name = "ClassNameTextBox";
            this.ClassNameTextBox.Size = new System.Drawing.Size(272, 20);
            this.ClassNameTextBox.TabIndex = 10;
            this.ClassNameTextBox.Text = "MyClass";
            // 
            // label3
            // 
            this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label3.Location = new System.Drawing.Point(60, 111);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(100, 22);
            this.label3.TabIndex = 12;
            this.label3.Text = "Summary";
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // abstrCheckBox
            // 
            this.abstrCheckBox.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.abstrCheckBox.Location = new System.Drawing.Point(188, 78);
            this.abstrCheckBox.Name = "abstrCheckBox";
            this.abstrCheckBox.Size = new System.Drawing.Size(264, 22);
            this.abstrCheckBox.TabIndex = 11;
            this.abstrCheckBox.Text = "Abstract Class";
            // 
            // label1
            // 
            this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label1.Location = new System.Drawing.Point(52, 48);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(128, 23);
            this.label1.TabIndex = 9;
            this.label1.Text = "Enter the Class Name";
            // 
            // createsDataGrid
            // 
            this.createsDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.createsDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.createsDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.createsDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.createsDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.createsDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.createsDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.createsDataGrid.CaptionText = "Creation Relation";
            this.createsDataGrid.DataMember = "";
            this.createsDataGrid.FlatMode = true;
            this.createsDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.createsDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.createsDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.createsDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.createsDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.createsDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.createsDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.createsDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.createsDataGrid.Location = new System.Drawing.Point(0, 180);
            this.createsDataGrid.Name = "createsDataGrid";
            this.createsDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.createsDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.createsDataGrid.PreferredColumnWidth = 150;
            this.createsDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.createsDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.createsDataGrid.Size = new System.Drawing.Size(520, 156);
            this.createsDataGrid.TabIndex = 0;
            // 
            // editCreatesButton
            // 
            this.editCreatesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.editCreatesButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.editCreatesButton.Location = new System.Drawing.Point(432, 59);
            this.editCreatesButton.Name = "editCreatesButton";
            this.editCreatesButton.Size = new System.Drawing.Size(75, 22);
            this.editCreatesButton.TabIndex = 3;
            this.editCreatesButton.Text = "&Edit";
            this.editCreatesButton.Click += new System.EventHandler(this.editCreatesButton_Click);
            // 
            // aggregatesPanel
            // 
            this.aggregatesPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.aggregatesPanel.Controls.Add(this.groupBox4);
            this.aggregatesPanel.Controls.Add(this.groupBox3);
            this.aggregatesPanel.Controls.Add(this.editAggButton);
            this.aggregatesPanel.Controls.Add(this.remAggrButton);
            this.aggregatesPanel.Controls.Add(this.addAggrButton);
            this.aggregatesPanel.Controls.Add(this.aggrDataGrid);
            this.aggregatesPanel.Location = new System.Drawing.Point(128, 32);
            this.aggregatesPanel.Name = "aggregatesPanel";
            this.aggregatesPanel.Size = new System.Drawing.Size(520, 336);
            this.aggregatesPanel.TabIndex = 14;
            // 
            // groupBox4
            // 
            this.groupBox4.Controls.Add(this.aggClassListBox);
            this.groupBox4.Location = new System.Drawing.Point(16, 52);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(384, 134);
            this.groupBox4.TabIndex = 8;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = " Classes in the selected component";
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.aggComboBox);
            this.groupBox3.Location = new System.Drawing.Point(16, 7);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(384, 38);
            this.groupBox3.TabIndex = 7;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Select Component";
            // 
            // aggComboBox
            // 
            this.aggComboBox.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.aggComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.aggComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.aggComboBox.Location = new System.Drawing.Point(3, 16);
            this.aggComboBox.Name = "aggComboBox";
            this.aggComboBox.Size = new System.Drawing.Size(378, 21);
            this.aggComboBox.Sorted = true;
            this.aggComboBox.TabIndex = 6;
            this.aggComboBox.SelectedIndexChanged += new System.EventHandler(this.aggComboBox_SelectedIndexChanged);
            // 
            // addAggrButton
            // 
            this.addAggrButton.Anchor = System.Windows.Forms.AnchorStyles.Top;
            this.addAggrButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addAggrButton.Location = new System.Drawing.Point(408, 74);
            this.addAggrButton.Name = "addAggrButton";
            this.addAggrButton.Size = new System.Drawing.Size(72, 23);
            this.addAggrButton.TabIndex = 1;
            this.addAggrButton.Text = "&Add";
            this.addAggrButton.Click += new System.EventHandler(this.addAggrButton_Click);
            // 
            // aggrDataGrid
            // 
            this.aggrDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.aggrDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.aggrDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.aggrDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.aggrDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.aggrDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.aggrDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.aggrDataGrid.CaptionText = "Aggregates";
            this.aggrDataGrid.DataMember = "";
            this.aggrDataGrid.FlatMode = true;
            this.aggrDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.aggrDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.aggrDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.aggrDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.aggrDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.aggrDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.aggrDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.aggrDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.aggrDataGrid.Location = new System.Drawing.Point(0, 210);
            this.aggrDataGrid.Name = "aggrDataGrid";
            this.aggrDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.aggrDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.aggrDataGrid.PreferredColumnWidth = 150;
            this.aggrDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.aggrDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.aggrDataGrid.Size = new System.Drawing.Size(520, 126);
            this.aggrDataGrid.TabIndex = 0;
            // 
            // label5
            // 
            this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label5.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label5.Location = new System.Drawing.Point(8, 52);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(280, 15);
            this.label5.TabIndex = 9;
            this.label5.Text = "Available  Classes in the selected component:";
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // referenceDataGrid
            // 
            this.referenceDataGrid.AlternatingBackColor = System.Drawing.Color.Lavender;
            this.referenceDataGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.referenceDataGrid.BackColor = System.Drawing.Color.WhiteSmoke;
            this.referenceDataGrid.BackgroundColor = System.Drawing.Color.LightGray;
            this.referenceDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.referenceDataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue;
            this.referenceDataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue;
            this.referenceDataGrid.CaptionText = "References";
            this.referenceDataGrid.DataMember = "";
            this.referenceDataGrid.FlatMode = true;
            this.referenceDataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
            this.referenceDataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
            this.referenceDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
            this.referenceDataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None;
            this.referenceDataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
            this.referenceDataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
            this.referenceDataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke;
            this.referenceDataGrid.LinkColor = System.Drawing.Color.Teal;
            this.referenceDataGrid.Location = new System.Drawing.Point(0, 187);
            this.referenceDataGrid.Name = "referenceDataGrid";
            this.referenceDataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro;
            this.referenceDataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
            this.referenceDataGrid.PreferredColumnWidth = 150;
            this.referenceDataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue;
            this.referenceDataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke;
            this.referenceDataGrid.Size = new System.Drawing.Size(520, 149);
            this.referenceDataGrid.TabIndex = 0;
            // 
            // referencePanel
            // 
            this.referencePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.referencePanel.Controls.Add(this.label7);
            this.referencePanel.Controls.Add(this.label8);
            this.referencePanel.Controls.Add(this.refComboBox);
            this.referencePanel.Controls.Add(this.refClassListBox);
            this.referencePanel.Controls.Add(this.editRefButton);
            this.referencePanel.Controls.Add(this.delRefButton);
            this.referencePanel.Controls.Add(this.addRefButton);
            this.referencePanel.Controls.Add(this.referenceDataGrid);
            this.referencePanel.Location = new System.Drawing.Point(128, 32);
            this.referencePanel.Name = "referencePanel";
            this.referencePanel.Size = new System.Drawing.Size(520, 336);
            this.referencePanel.TabIndex = 15;
            // 
            // label7
            // 
            this.label7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label7.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label7.Location = new System.Drawing.Point(8, 59);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(280, 22);
            this.label7.TabIndex = 9;
            this.label7.Text = "Available  Classes in the selected component:";
            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // label8
            // 
            this.label8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label8.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label8.Location = new System.Drawing.Point(8, 7);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(280, 22);
            this.label8.TabIndex = 8;
            this.label8.Text = "Components in the project";
            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // editRefButton
            // 
            this.editRefButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.editRefButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.editRefButton.Location = new System.Drawing.Point(432, 67);
            this.editRefButton.Name = "editRefButton";
            this.editRefButton.Size = new System.Drawing.Size(75, 21);
            this.editRefButton.TabIndex = 3;
            this.editRefButton.Text = "&Edit";
            this.editRefButton.Click += new System.EventHandler(this.editRefButton_Click);
            // 
            // addRefButton
            // 
            this.addRefButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.addRefButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.addRefButton.Location = new System.Drawing.Point(432, 37);
            this.addRefButton.Name = "addRefButton";
            this.addRefButton.Size = new System.Drawing.Size(75, 21);
            this.addRefButton.TabIndex = 1;
            this.addRefButton.Text = "&Add";
            this.addRefButton.Click += new System.EventHandler(this.addRefButton_Click);
            // 
            // clsLinkLabel
            // 
            this.clsLinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.clsLinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.clsLinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.clsLinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.clsLinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 16);
            this.clsLinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.clsLinkLabel.Location = new System.Drawing.Point(16, 40);
            this.clsLinkLabel.Name = "clsLinkLabel";
            this.clsLinkLabel.Size = new System.Drawing.Size(88, 32);
            this.clsLinkLabel.TabIndex = 1;
            this.clsLinkLabel.TabStop = true;
            this.clsLinkLabel.Text = "Class Properties";
            this.clsLinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.clsLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // reflinkLabel
            // 
            this.reflinkLabel.BackColor = System.Drawing.SystemColors.Info;
            this.reflinkLabel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.reflinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.reflinkLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.reflinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 10);
            this.reflinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
            this.reflinkLabel.Location = new System.Drawing.Point(16, 275);
            this.reflinkLabel.Name = "reflinkLabel";
            this.reflinkLabel.Size = new System.Drawing.Size(88, 22);
            this.reflinkLabel.TabIndex = 4;
            this.reflinkLabel.TabStop = true;
            this.reflinkLabel.Text = "References";
            this.reflinkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.reflinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkClicked);
            // 
            // crtComboBox
            // 
            this.crtComboBox.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.crtComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.crtComboBox.Location = new System.Drawing.Point(16, 30);
            this.crtComboBox.Name = "crtComboBox";
            this.crtComboBox.Size = new System.Drawing.Size(392, 21);
            this.crtComboBox.Sorted = true;
            this.crtComboBox.TabIndex = 6;
            this.crtComboBox.SelectedIndexChanged += new System.EventHandler(this.crtComboBox_SelectedIndexChanged);
            // 
            // infoLabel
            // 
            this.infoLabel.BackColor = System.Drawing.Color.LightSteelBlue;
            this.infoLabel.Font = new System.Drawing.Font("Courier New", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.infoLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.infoLabel.Location = new System.Drawing.Point(192, 0);
            this.infoLabel.Name = "infoLabel";
            this.infoLabel.Size = new System.Drawing.Size(384, 24);
            this.infoLabel.TabIndex = 10;
            this.infoLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.infoLabel.Visible = false;
            // 
            // creationPanel
            // 
            this.creationPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.creationPanel.AutoScroll = true;
            this.creationPanel.Controls.Add(this.label5);
            this.creationPanel.Controls.Add(this.label6);
            this.creationPanel.Controls.Add(this.crtComboBox);
            this.creationPanel.Controls.Add(this.crtClsListBox);
            this.creationPanel.Controls.Add(this.editCreatesButton);
            this.creationPanel.Controls.Add(this.remCreatesButton);
            this.creationPanel.Controls.Add(this.addCreatesButton);
            this.creationPanel.Controls.Add(this.createsDataGrid);
            this.creationPanel.Location = new System.Drawing.Point(128, 32);
            this.creationPanel.Name = "creationPanel";
            this.creationPanel.Size = new System.Drawing.Size(520, 336);
            this.creationPanel.TabIndex = 16;
            // 
            // label6
            // 
            this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.label6.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label6.Location = new System.Drawing.Point(8, 7);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(280, 22);
            this.label6.TabIndex = 8;
            this.label6.Text = "Components in the project";
            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // remCreatesButton
            // 
            this.remCreatesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.remCreatesButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.remCreatesButton.Location = new System.Drawing.Point(432, 89);
            this.remCreatesButton.Name = "remCreatesButton";
            this.remCreatesButton.Size = new System.Drawing.Size(75, 21);
            this.remCreatesButton.TabIndex = 2;
            this.remCreatesButton.Text = "&Remove";
            this.remCreatesButton.Click += new System.EventHandler(this.remCreatesButton_Click);
            // 
            // ClassDetailsEditForm
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.BackColor = System.Drawing.SystemColors.Control;
            this.ClientSize = new System.Drawing.Size(656, 414);
            this.Controls.Add(this.doneButton);
            this.Controls.Add(this.infoLabel);
            this.Controls.Add(this.flinkLabel);
            this.Controls.Add(this.mlinkLabel);
            this.Controls.Add(this.crtlinkLabel);
            this.Controls.Add(this.reflinkLabel);
            this.Controls.Add(this.agglinkLabel);
            this.Controls.Add(this.inhlinkLabel);
            this.Controls.Add(this.clsLinkLabel);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.methodsPanel);
            this.Controls.Add(this.fieldsPanel);
            this.Controls.Add(this.classPropPanel);
            this.Controls.Add(this.creationPanel);
            this.Controls.Add(this.referencePanel);
            this.Controls.Add(this.aggregatesPanel);
            this.Controls.Add(this.inheritancePanel);
            this.Name = "ClassDetailsEditForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Class Details";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.ClassDetailsEditForm_Closing);
            ((System.ComponentModel.ISupportInitialize)(this.paramsDataGrid)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.fieldDataGrid)).EndInit();
            this.methodsPanel.ResumeLayout(false);
            this.paramGroupBox.ResumeLayout(false);
            this.groupBox1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.methodDataGrid)).EndInit();
            this.fieldsPanel.ResumeLayout(false);
            this.inheritancePanel.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.inheritDataGrid)).EndInit();
            this.classPropPanel.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.createsDataGrid)).EndInit();
            this.aggregatesPanel.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox3.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.aggrDataGrid)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.referenceDataGrid)).EndInit();
            this.referencePanel.ResumeLayout(false);
            this.creationPanel.ResumeLayout(false);
            this.ResumeLayout(false);

        }
        #endregion


        #region Init methods
        DataRow crow;
        bool state;

        private void InitComponentComboBoxes()
        {
            DataTable compTable = this.dataSet.Tables[SchemaNames.Components];
            ArrayList compList = new ArrayList();
            foreach (DataRow row in compTable.Rows)
            {

                this.aggComboBox.Items.Add(row[SchemaNames.ComponentName]);
                this.inhComboBox.Items.Add(row[SchemaNames.ComponentName]);
                this.refComboBox.Items.Add(row[SchemaNames.ComponentName]);
                this.crtComboBox.Items.Add(row[SchemaNames.ComponentName]);
            }
            this.aggComboBox.SelectedItem = this.compName;
            this.inhComboBox.SelectedItem = this.compName;
            this.crtComboBox.SelectedItem = this.compName;
            this.refComboBox.SelectedItem = this.compName;
        }
        private void InitClassDetails()
        {
            crow = this.dataSet.Tables[SchemaNames.Classes].Rows.Find(new object[]{
													     this.compName, this.cName});
            if (crow == null)
            {
                ErrorMessage.Show("From ClassDetailsEditForm: class row null for .." + this.cName, "error");
                return;
            }
            this.ClassNameTextBox.Text = this.cName;
            this.summaryTextBox.Text = (string)crow[SchemaNames.Summary];
            string ct = (string)crow[SchemaNames.ClassType];
            if (ct == MethodType.Abstract.ToString().ToLower())
                this.abstrCheckBox.Checked = true;
            state = this.abstrCheckBox.Checked;



        }

        private void InitFieldDataGrid()
        {
            DataTable fieldTable = this.dataSet.Tables[SchemaNames.Fields];
            fieldTable.Columns[SchemaNames.ComponentName].ColumnMapping = MappingType.Hidden;
            fieldTable.Columns[SchemaNames.ClassName].ColumnMapping = MappingType.Hidden;

            DataView fieldView = new DataView(fieldTable);
            fieldView.AllowNew = false;
            fieldView.AllowEdit = false;
            fieldView.RowFilter = SchemaNames.ComponentName + "='" + this.compName + "' and " +
                SchemaNames.ClassName + "='" + cName + "'";
            this.fieldDataGrid.DataSource = fieldView;

        }

        private void InitMethodDataGrid()
        {
            DataTable methdTable = this.dataSet.Tables[SchemaNames.Methods];
            methdTable.Columns[SchemaNames.ComponentName].ColumnMapping = MappingType.Hidden;
            methdTable.Columns[SchemaNames.ClassName].ColumnMapping = MappingType.Hidden;
            methdTable.Columns[SchemaNames.MethodID].ColumnMapping = MappingType.Hidden;

            DataView methodView = new DataView(methdTable);
            methodView.AllowNew = false;
            methodView.AllowEdit = false;
            methodView.RowFilter = SchemaNames.ComponentName + "='" + this.compName + "' and " +
                SchemaNames.ClassName + "='" + cName + "'";
            this.methodDataGrid.DataSource = methodView;

        }
        private void InitParameterDataGrid()
        {
            paramTable = this.dataSet.Tables[SchemaNames.Parameters];
            paramTable.Columns[SchemaNames.MethodID].ColumnMapping = MappingType.Hidden;
            paramTable.Columns[SchemaNames.ParamOrder].ColumnMapping = MappingType.Hidden;
            paramView = new DataView(paramTable);
            paramView.AllowNew = false;
            paramView.AllowEdit = false;
            paramView.Sort = SchemaNames.ParamOrder;
            this.paramsDataGrid.DataSource = this.paramView;

            this.methodDataGrid_CurrentCellChanged(null, null);
        }

        DataTable inhTable;
        private void InitInheritanceDataGrid()
        {
            DataTable ctable = this.dataSet.Tables[SchemaNames.Classes];
            DataRow[] crows = ctable.Select(SchemaNames.ComponentName + "='" + this.compName + "'");
            foreach (DataRow row in crows)
            {
                if ((string)row[SchemaNames.ClassName] != this.cName)
                    this.inhClassListBox.Items.Add(row[SchemaNames.ClassName]);
            }
            inhTable = this.dataSet.Tables[SchemaNames.Inheritances];
            inhTable.Columns[SchemaNames.DerivedClass].ColumnMapping = MappingType.Hidden;
            inhTable.Columns[SchemaNames.DerivedClassComponent].ColumnMapping = MappingType.Hidden;

            DataView inhView = new DataView(inhTable);
            inhView.RowFilter = SchemaNames.DerivedClassComponent + "='" + this.compName + "' and " +
                SchemaNames.DerivedClass + "='" + this.cName + "'";
            inhView.AllowEdit = false;
            inhView.AllowNew = false;

            this.inheritDataGrid.DataSource = inhView;


        }
        DataTable aggTable;
        private void InitAggregateDataGrid()
        {
            DataTable ctable = this.dataSet.Tables[SchemaNames.Classes];
            DataRow[] crows = ctable.Select(SchemaNames.ComponentName + "='" + this.compName + "'");
            foreach (DataRow row in crows)
            {
                if ((string)row[SchemaNames.ClassName] != this.cName)
                    this.aggClassListBox.Items.Add(row[SchemaNames.ClassName]);
            }
            aggTable = this.dataSet.Tables[SchemaNames.Aggregates];
            aggTable.Columns[SchemaNames.AggregatorClass].ColumnMapping = MappingType.Hidden;
            aggTable.Columns[SchemaNames.AggregatorClassComponent].ColumnMapping = MappingType.Hidden;
            aggTable.Columns[SchemaNames.AggregateeClassComponent].ColumnMapping = MappingType.Hidden;

            DataView view = new DataView(aggTable);
            view.RowFilter = SchemaNames.AggregatorClassComponent + "='" + this.compName + "' and " +
                SchemaNames.AggregatorClass + "='" + this.cName + "'";
            view.AllowEdit = false;
            view.AllowNew = false;

            this.aggrDataGrid.DataSource = view;
        }
        DataTable createTable;
        private void InitCreatesDataGrid()
        {
            DataTable ctable = this.dataSet.Tables[SchemaNames.Classes];
            DataRow[] crows = ctable.Select(SchemaNames.ComponentName + "='" + this.compName + "'");
            foreach (DataRow row in crows)
            {
                if ((string)row[SchemaNames.ClassName] != this.cName)
                    this.crtClsListBox.Items.Add(row[SchemaNames.ClassName]);
            }
            createTable = this.dataSet.Tables[SchemaNames.Creates];
            createTable.Columns[SchemaNames.CreatorClassName].ColumnMapping = MappingType.Hidden;
            createTable.Columns[SchemaNames.CreatorComponentName].ColumnMapping = MappingType.Hidden;
            createTable.Columns[SchemaNames.CreateeComponentName].ColumnMapping = MappingType.Hidden;

            DataView view = new DataView(createTable);
            view.RowFilter = SchemaNames.CreatorComponentName + "='" + this.compName + "' and " +
                SchemaNames.CreatorClassName + "='" + this.cName + "'";
            view.AllowEdit = false;
            view.AllowNew = false;

            this.createsDataGrid.DataSource = view;
        }

        DataTable refTable;
        private void InitReferenceDataGrid()
        {
            DataTable ctable = this.dataSet.Tables[SchemaNames.Classes];
            DataRow[] crows = ctable.Select(SchemaNames.ComponentName + "='" + this.compName + "'");
            foreach (DataRow row in crows)
            {
                if ((string)row[SchemaNames.ClassName] != this.cName)
                    this.refClassListBox.Items.Add(row[SchemaNames.ClassName]);
            }
            refTable = this.dataSet.Tables[SchemaNames.References];
            refTable.Columns[SchemaNames.ReferenceClass].ColumnMapping = MappingType.Hidden;
            refTable.Columns[SchemaNames.ReferenceComponent].ColumnMapping = MappingType.Hidden;
            refTable.Columns[SchemaNames.ReferedComponentName].ColumnMapping = MappingType.Hidden;

            DataView view = new DataView(refTable);
            view.RowFilter = SchemaNames.ReferenceComponent + "='" + this.compName + "' and " +
                SchemaNames.ReferenceClass + "='" + this.cName + "'";
            view.AllowEdit = false;
            view.AllowNew = false;

            this.referenceDataGrid.DataSource = view;
        }

        private DataRow GetCurrentRow(DataGrid grid)
        {
            BindingManagerBase bm = grid.BindingContext[grid.DataSource, grid.DataMember];
            return ((DataRowView)bm.Current).Row;
        }

        private void LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            LinkLabel ll = new LinkLabel();
            foreach (Control c in this.Controls)
            {
                if (c is LinkLabel)
                    ll = c as LinkLabel;
                if (ll.Text != ((LinkLabel)sender).Text)
                {
                    ll.BackColor = Color.MidnightBlue;
                    ll.LinkColor = Color.Ivory;
                }
            }
            ((LinkLabel)sender).BackColor = Color.Ivory;
            ((LinkLabel)sender).LinkColor = Color.MidnightBlue;
            infoLabel.Text = this.labelToInfo[((LinkLabel)sender).Text] as string;

            IDictionaryEnumerator enumerator = labelToPanel.GetEnumerator();
            while (enumerator.MoveNext())
            {
                Panel element = enumerator.Value as Panel;
                element.Hide();

            }
            Panel activePanel = this.labelToPanel[((LinkLabel)sender).Text] as Panel;
            activePanel.Show();

        }
        #endregion


        #region fields

        private void addFieldButton_Click(object sender, System.EventArgs e)
        {
            AddFieldForm form = new AddFieldForm();
            form.ShowDialog(this);

            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;

            IField fld = new InfoClasses.FieldInfo();

            fld.FieldType = form.FieldType;
            fld.FieldName = form.FieldName;
            fld.FieldVisibility = form.Visibility;
            fld.FieldSummary = form.Summary;
            fld.SetMetaInfo(form.MetaInfo);

            this.subject.AddField(this.compName, this.cName, fld);
        }

        private void editFieldButton_Click(object sender, System.EventArgs e)
        {

            //first find the selected row

            if (this.fieldDataGrid.CurrentRowIndex < 0)
            {
                ErrorMessage.Show("Select a field", "No row selected");
                return;
            }

            DataView view = (DataView)this.fieldDataGrid.DataSource;
            DataTable table = view.Table;
            DataRow row = this.GetCurrentRow(this.fieldDataGrid);

            AddFieldForm form = new AddFieldForm();
            form.FieldName = (string)row[SchemaNames.FieldName];
            form.FieldType = (string)row[SchemaNames.FieldType];
            form.Summary = (string)row[SchemaNames.Summary];
            form.Visibility = (string)row[SchemaNames.Visibility];
            form.MetaInfo = (string)row[SchemaNames.MetaInfo];
            form.ShowDialog();
            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;
            if (table.Rows.Find(new object[] { this.compName, this.cName, form.FieldName }) != null
                && (string)row[SchemaNames.FieldName] != form.FieldName)
            {
                ErrorMessage.Show("Field Name already present, please select a different name", "Duplicate FieldName");
                return;
            }

            try
            {
                row[SchemaNames.FieldName] = form.FieldName;
                row[SchemaNames.FieldType] = form.FieldType;
                row[SchemaNames.Summary] = form.Summary;
                row[SchemaNames.Visibility] = form.Visibility;
                row[SchemaNames.MetaInfo] = form.MetaInfo;
            }
            catch (ConstraintException)
            {
                ErrorMessage.Show("This field already exists :(", "error!");

            }



        }

        private void remFieldButton_Click(object sender, System.EventArgs e)
        {
            if (this.fieldDataGrid.CurrentRowIndex < 0)
            {
                ErrorMessage.Show("Select a field", "No row selected");
                return;
            }
            DataTable table = this.dataSet.Tables[SchemaNames.Fields];
            table.Rows.Remove(this.GetCurrentRow(this.fieldDataGrid));


        }

        private void fieldDataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            System.Drawing.Point pt = new Point(e.X, e.Y);
            DataGrid.HitTestInfo hti = this.fieldDataGrid.HitTest(pt);
            if (hti.Type == DataGrid.HitTestType.Cell)
            {
                this.fieldDataGrid.CurrentCell = new DataGridCell(hti.Row, hti.Column);
                this.fieldDataGrid.Select(hti.Row);
            }
        }
        #endregion

        #region Methods
        private void addMethodButton_Click(object sender, System.EventArgs e)
        {
            DataTable table = this.dataSet.Tables[SchemaNames.Methods];
            MethodEditForm form = new MethodEditForm();
            form.ShowDialog(this);

            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;

            IMethod mthd = new InfoClasses.MethodInfo();

            mthd.MethodName = form.MethodName;
            mthd.MethodReturnType = form.ReturnType;
            if (form.MethodType == MethodType.Abstract.ToString().ToLower())
                mthd.MethodType = MethodType.Abstract;
            else
                mthd.MethodType = MethodType.Concrete;
            mthd.MethodVisibility = form.Visibility;
            mthd.MethodSummary = form.Summary;
            mthd.SetMetaInfo(form.MetaInfo);

            if (this.subject.AddMethod(this.compName, this.cName, mthd))
                this.methodDataGrid_CurrentCellChanged(null, null);
        }

        private void editMethodButton_Click(object sender, System.EventArgs e)
        {
            if (this.methodDataGrid.CurrentRowIndex < 0)
            {
                ErrorMessage.Show("Select a Method", "No method selected");
                return;
            }

            DataView view = (DataView)this.methodDataGrid.DataSource;
            DataTable table = view.Table;
            DataRow row = this.GetCurrentRow(methodDataGrid);

            MethodEditForm form = new MethodEditForm();
            form.MethodName = (string)row[SchemaNames.MethodName];
            form.MethodType = (string)row[SchemaNames.MethodType];
            form.ReturnType = (string)row[SchemaNames.MethodReturnType];
            form.Summary = (string)row[SchemaNames.Summary];
            form.Visibility = (string)row[SchemaNames.Visibility];
            form.MetaInfo = (string)row[SchemaNames.MetaInfo];
            form.ShowDialog();
            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;


            try
            {
                row[SchemaNames.MethodName] = form.MethodName;
                row[SchemaNames.MethodType] = form.MethodType;
                row[SchemaNames.MethodReturnType] = form.ReturnType;
                row[SchemaNames.Summary] = form.Summary;
                row[SchemaNames.Visibility] = form.Visibility;
                row[SchemaNames.MetaInfo] = form.MetaInfo;
            }
            catch (ConstraintException)
            {
                ErrorMessage.Show("This method already exists", "error!");
            }

        }

        private void remMethodButton_Click(object sender, System.EventArgs e)
        {
            if (this.methodDataGrid.CurrentRowIndex < 0)
            {
                ErrorMessage.Show("Select a Method", "No method selected");
                return;
            }
            DataView view = (DataView)this.methodDataGrid.DataSource;
            DataTable table = view.Table;
            table.Rows.Remove(this.GetCurrentRow(this.methodDataGrid));
            this.methodDataGrid_CurrentCellChanged(null, null);//required so that the parameter view is updated....

        }

        #endregion

        #region Parameters

        DataTable paramTable;
        DataView paramView;

        private void methodDataGrid_CurrentCellChanged(object sender, System.EventArgs e)
        {
            //when the current cell in the method data grid changes, 
            //update the view in the parameter data grid.
            int index = this.methodDataGrid.CurrentRowIndex;
            if (index < 0)
            {
                //when index < 0 , this will clear the parameter data grid.!
                paramView.RowFilter = SchemaNames.MethodID + "='" + index + "'";
                return;
            }

            DataRow curRow = this.GetCurrentRow(this.methodDataGrid);
            int mid = (int)curRow[SchemaNames.MethodID];

            paramView.RowFilter = SchemaNames.MethodID + "='" + mid + "'";
            this.paramGroupBox.Text = "Parameters of method:" + curRow[SchemaNames.MethodName] as string;

        }

        private void addParamButton_Click(object sender, System.EventArgs e)
        {

            if (this.methodDataGrid.CurrentRowIndex < 0)
            {
                ErrorMessage.Show("No methods found..please add a method", "error");
                return;
            }

            ParameterEditForm form = new ParameterEditForm();
            form.ShowDialog();
            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;
            int index = this.methodDataGrid.CurrentRowIndex;
            if (index < 0)
            {
                ErrorMessage.Show("No methods found to add the parameter", "error!");
                return;
            }

            int mid = (int)this.GetCurrentRow(this.methodDataGrid)[SchemaNames.MethodID];
            IParameter param = new InfoClasses.ParameterInfo();
            param.ParameterName = form.ParamName;
            param.ParameterType = form.ParamType;
            param.Summary = form.Summary;
            param.SetMetaInfo(form.MetaInfo);
            this.subject.AddParameter(mid, param);
        }

        private void paramEditButton_Click(object sender, System.EventArgs e)
        {
            int i = this.paramsDataGrid.CurrentRowIndex;
            if (i < 0)
            {
                ErrorMessage.Show("No parameters found to Edit!", "Error");
                return;
            }
            DataRow row = this.GetCurrentRow(this.paramsDataGrid);
            ParameterEditForm form = new ParameterEditForm();
            form.ParamType = (string)row[SchemaNames.ParameterType];
            form.ParamName = (string)row[SchemaNames.ParameterName];
            form.Summary = (string)row[SchemaNames.Summary];
            form.MetaInfo = (string)row[SchemaNames.MetaInfo];
            form.ShowDialog();
            if (form.DialogResult == DialogResult.Cancel)
                return;
            if (form.HasErrors())
                return;


            try
            {
                row[SchemaNames.ParameterName] = form.ParamName;
                row[SchemaNames.ParameterType] = form.ParamType;
                row[SchemaNames.Summary] = form.Summary;
                row[SchemaNames.MetaInfo] = form.MetaInfo;
            }
            catch (ConstraintException)
            {
                ErrorMessage.Show("This parameter already exists!", "error!");
                return;
            }

        }

        private void removeParamButton_Click(object sender, System.EventArgs e)
        {

            int i = this.paramsDataGrid.CurrentRowIndex;
            if (i < 0)
            {
                ErrorMessage.Show("No parameters found to delete!", "Error");
                return;
            }
            this.paramTable.Rows.Remove(this.GetCurrentRow(this.paramsDataGrid));
        }



        private void paramUpButton_Click(object sender, System.EventArgs e)
        {
            int index = this.paramsDataGrid.CurrentRowIndex;
            if (index < 0)
                return;
            DataRow curRow = this.GetCurrentRow(this.paramsDataGrid);
            int porder = (int)curRow[SchemaNames.ParamOrder];

            if (porder == 0)
            {
                MessageBox.Show("This is the first parameter");
                return;
            }

            int mid = (int)curRow[SchemaNames.MethodID];

            DataRow[] upRow = this.paramTable.Select(SchemaNames.MethodID + "='" + mid + "' and " +
                SchemaNames.ParamOrder + "='" + (porder - 1) + "'");

            if (upRow.Length != 1)
            {
                ErrorMessage.Show("Inconsistency in parameters found", "!error");
            }

            try
            {
                upRow[0][SchemaNames.ParamOrder] = porder;
                curRow[SchemaNames.ParamOrder] = porder - 1;
                this.paramView.Sort = SchemaNames.ParamOrder;
                this.paramsDataGrid.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

        private void paramDownButton_Click(object sender, System.EventArgs e)
        {
            int index = this.paramsDataGrid.CurrentRowIndex;
            if (index < 0)
                return;
            if (this.methodDataGrid.CurrentRowIndex < 0)
                return;

            int mid = (int)this.GetCurrentRow(this.methodDataGrid)[SchemaNames.MethodID];
            DataRow[] prows = this.paramTable.Select(SchemaNames.MethodID + "='" + mid + "'");


            DataRow curRow = this.GetCurrentRow(this.paramsDataGrid);
            int porder = (int)curRow[SchemaNames.ParamOrder];

            if (porder == prows.Length - 1)
            {
                MessageBox.Show("This is the last parameter");
                return;
            }



            DataRow[] downRow = this.paramTable.Select(SchemaNames.MethodID + "='" + mid + "' and " +
                SchemaNames.ParamOrder + "='" + (porder + 1) + "'");

            if (downRow.Length != 1)
            {
                ErrorMessage.Show("Inconsistency in parameters found", "!error");
            }

            try
            {
                downRow[0][SchemaNames.ParamOrder] = porder;
                curRow[SchemaNames.ParamOrder] = porder + 1;
                this.paramView.Sort = SchemaNames.ParamOrder;
                this.paramsDataGrid.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

        }
        #endregion

        #region Done + Misc + paint

        private bool error = false;
        private void doneButton_Click(object sender, System.EventArgs e)
        {
            //update the summary
            this.crow[SchemaNames.Summary] = this.summaryTextBox.Text;
            //If the class name is of zero length then it is not updated
            string tbText = this.ClassNameTextBox.Text;
            if (tbText.Length == 0)
            {
                ErrorMessage.Show("Class Name cannot be of null length", "error");
                //				this.error=true;

            }
            else if (this.cName != tbText)//update only if unequal.. can optimize a few things.
            {

                if (!this.subject.RenameClass(this.compName, this.cName, tbText))
                    ErrorMessage.Show("Couldnot change the name of class to " + tbText, "Duplicate Name");
                else
                    this.cName = tbText;
            }

            if (this.abstrCheckBox.Checked != state)
            {
                if (this.abstrCheckBox.Checked)
                    this.crow[SchemaNames.ClassType] = MethodType.Abstract.ToString().ToLower();
                else
                    this.crow[SchemaNames.ClassType] = MethodType.Concrete.ToString().ToLower();
                state = true;
            }
            else state = false;


        }
        public string ClassName
        {
            get { return this.cName; }
        }
        public bool ClassStateChanged
        {
            get { return this.state; }
        }

        public bool HasErrors()
        {
            return error;
        }

        private bool CheckMethodValidity(DataRow row)
        {
            return false;
        }


        private void classMetaInfoButton_Click(object sender, System.EventArgs e)
        {


            DataTable table = this.dataSet.Tables[SchemaNames.Classes];
            DataRow row = table.Rows.Find(new object[] { this.compName, this.cName });
            MetaInfoEditor mie = new MetaInfoEditor((string)row[SchemaNames.MetaInfo]);
            if (mie.ShowDialog() == DialogResult.Cancel)
                return;
            row[SchemaNames.MetaInfo] = mie.MetaInfo;

        }

        private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            Control c = sender as Control;
            LinearGradientBrush brush = new LinearGradientBrush(c.ClientRectangle,
                Color.MidnightBlue,
                Color.MidnightBlue,
                LinearGradientMode.ForwardDiagonal
                );
            e.Graphics.FillRectangle(brush, c.ClientRectangle);


        }

        #endregion

        #region Inheritance
        private IInheritance GetCurInheritance()
        {
            IInheritance inh = new InfoClasses.InheritanceInfo();
            inh.BaseClassComponent = this.inhComboBox.SelectedItem.ToString();
            inh.DerivedClassComponent = this.compName;
            inh.BaseClass = this.inhClassListBox.SelectedItem as string;
            inh.DerivedClass = this.cName;
            return inh;
        }
        private void addInhButton_Click(object sender, System.EventArgs e)
        {
            if (this.inhClassListBox.SelectedIndex < 0)
            {
                ErrorMessage.Show("Select a Base CLass", "Error");
                return;
            }

            this.subject.AddInheritance(GetCurInheritance(), true);

        }

        private void delInhButton_Click(object sender, System.EventArgs e)
        {
            if (this.inheritDataGrid.CurrentRowIndex < 0)
            {
                return;
            }
            try
            {
                DataRow row = this.GetCurrentRow(this.inheritDataGrid);
                IInheritance inh = new InfoClasses.InheritanceInfo();
                inh.BaseClassComponent = (string)row[SchemaNames.BaseClassComponent];
                inh.DerivedClassComponent = this.compName;
                inh.BaseClass = (string)row[SchemaNames.BaseClass];
                inh.DerivedClass = this.cName;
                this.subject.RemoveInheritance(inh);
            }
            catch (Exception exp)
            {
                ErrorMessage.Show("Error while removing:" + exp.Message, "Error");
            }

        }


        #endregion

        #region Aggregate
        private void addAggrButton_Click(object sender, System.EventArgs e)
        {
            if (this.aggClassListBox.SelectedIndex < 0)
            {
                ErrorMessage.Show("Select a class", "Error");
                return;
            }
            RelationEditForm form = new RelationEditForm("Aggregate Name");
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            IAggregate agg = new InfoClasses.AggregateInfo();
            agg.AggregateeClassComponent = this.aggComboBox.SelectedItem.ToString();
            agg.AggregatorClassComponent = this.compName;

            agg.AggregateeClass = this.aggClassListBox.SelectedItem as string;
            agg.AggregatorClass = this.cName;
            agg.AggregateName = form.Input;
            agg.Order = form.Order;

            this.subject.AddAggregate(agg);

        }

        private void remAggrButton_Click(object sender, System.EventArgs e)
        {
            if (this.aggrDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.aggrDataGrid);
            this.aggTable.Rows.Remove(row);
        }

        private void editAggButton_Click(object sender, System.EventArgs e)
        {
            if (this.aggrDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.aggrDataGrid);
            RelationEditForm form = new RelationEditForm("Edit Aggregate");
            form.Input = (string)row[SchemaNames.RelationName];
            if ((string)row[SchemaNames.RelationOrder] == RelationOrder.Single.ToString())
                form.Order = RelationOrder.Single;
            else
                form.Order = RelationOrder.Multiple;
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            try
            {
                row[SchemaNames.RelationName] = form.Input;
                row[SchemaNames.RelationOrder] = form.Order.ToString();

            }
            catch
            {
                ErrorMessage.Show("The aggregate with the name:" + form.Input +
                    " already exists!", "Error");
                return;
            }
        }
        #endregion

        #region Creates Relation
        private void addCreatesButton_Click(object sender, System.EventArgs e)
        {
            if (this.crtClsListBox.SelectedIndex < 0)
            {
                ErrorMessage.Show("Select a class", "Error");
                return;
            }
            RelationEditForm form = new RelationEditForm(null);
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            ICreation cr = new InfoClasses.CreationInfo();
            cr.CreatorComponentName = this.compName;
            cr.CreateeComponentName = this.crtComboBox.SelectedItem.ToString();
            cr.CreatorClassName = this.cName;
            cr.CreateeClassName = this.crtClsListBox.SelectedItem as string;
            cr.Order = form.Order;
            this.subject.AddCreates(cr);


        }

        private void remCreatesButton_Click(object sender, System.EventArgs e)
        {
            if (this.createsDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.createsDataGrid);
            this.createTable.Rows.Remove(row);

        }

        private void editCreatesButton_Click(object sender, System.EventArgs e)
        {
            if (this.createsDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.createsDataGrid);
            RelationEditForm form = new RelationEditForm(null);
            if ((string)row[SchemaNames.RelationOrder] == RelationOrder.Single.ToString())
                form.Order = RelationOrder.Single;
            else
                form.Order = RelationOrder.Multiple;
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            try
            {
                row[SchemaNames.RelationOrder] = form.Order.ToString();

            }
            catch
            {
                ErrorMessage.Show("The creates relation with the name:" + form.Input +
                    " already exists!", "Error");
                return;
            }


        }

        #endregion

        #region References

        private void addRefButton_Click(object sender, System.EventArgs e)
        {

            if (this.refClassListBox.SelectedIndex < 0)
            {
                ErrorMessage.Show("Select a class", "Error");
                return;
            }
            RelationEditForm form = new RelationEditForm("Reference Name");
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            IReference rf = new InfoClasses.ReferenceInfo();
            rf.ReferenceName = form.Input;
            rf.ReferenceComponent = this.compName;
            rf.ReferedComponentName = this.refComboBox.SelectedItem.ToString();
            rf.Order = form.Order;
            rf.ReferedClassName = this.refClassListBox.SelectedItem as string;
            rf.ReferenceClass = this.cName;
            this.subject.AddReference(rf);

        }

        private void delRefButton_Click(object sender, System.EventArgs e)
        {

            if (this.referenceDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.referenceDataGrid);
            this.refTable.Rows.Remove(row);
        }




        private void editRefButton_Click(object sender, System.EventArgs e)
        {

            if (this.referenceDataGrid.CurrentRowIndex < 0)
                return;
            DataRow row = this.GetCurrentRow(this.referenceDataGrid);
            RelationEditForm form = new RelationEditForm("Edit Reference");
            form.Input = (string)row[SchemaNames.ReferenceName];
            if ((string)row[SchemaNames.RelationOrder] == RelationOrder.Single.ToString())
                form.Order = RelationOrder.Single;
            else
                form.Order = RelationOrder.Multiple;
            if (form.ShowDialog() == DialogResult.Cancel)
                return;
            try
            {
                row[SchemaNames.ReferenceName] = form.Input;
                row[SchemaNames.RelationOrder] = form.Order.ToString();

            }
            catch
            {
                ErrorMessage.Show("The reference with the name:" + form.Input +
                    " already exists!", "Error");
                return;
            }
        }
        #endregion

        # region component Combo box listeners
        private void inhComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            //just find the classes in the component and and populate the list box.
            this.PopulateListBox(this.inhClassListBox, this.inhComboBox.SelectedItem.ToString());

        }

        private void crtComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {

            this.PopulateListBox(this.crtClsListBox, (sender as ComboBox).SelectedItem.ToString());

        }

        private void refComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {


            this.PopulateListBox(this.refClassListBox, (sender as ComboBox).SelectedItem.ToString());
        }

        private void aggComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {

            this.PopulateListBox(this.aggClassListBox, (sender as ComboBox).SelectedItem.ToString());

        }

        private void PopulateListBox(ListBox lb, string comp)
        {
            lb.Items.Clear();
            DataTable clsTable = this.dataSet.Tables[SchemaNames.Classes];
            DataRow[] classes = clsTable
                .Select(SchemaNames.ComponentName + "='" + comp + "'");
            foreach (DataRow row in classes)
            {
                lb.Items.Add(row[SchemaNames.ClassName] as string);
            }
        }

        #endregion

        private void ClassDetailsEditForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            this.doneButton_Click(this.doneButton, null);
        }


    }
}